Skip to content

Conversation

bevzzz
Copy link
Collaborator

@bevzzz bevzzz commented Oct 1, 2025

This PR adds 3 new namespaces for managing RBAC entities:

  • roles: Operations for defining roles and managing their permissions
  • groups: Working with RBAC groups
  • user.db and users.oidc: Operations for managing users and their assigned roles

Example API (see RbacITest.java for more).

client.roles.create(
  "rock-n-role",
  Permission.aliases("Things_Alias", "Things", AliasesPermission.Action.READ, AliasPermission.Action.DELETE),
  Permission.backups("Things", BackupsPermission.Action.MANAGE),
  Permission.tenants("Things", "tenant-x", TenantPermissions.Actions.CREATE)
  // etc.
);


client.users.db.create("elvis");
client.users.db.assignRoles("elvis", "rock-n-role");
client.users.oidc.assignRoles("external", "rock-n-role");

client.groups.assignRoles("./media-group", "singer-role", "producer-role");
assert client.groups.knownGroupNames().size() == 1; // "./media-group"

client.roles.removePermissions(
  "rock-n-role",
  Permission.aliases("Things_Alias", "Things", AliasesPermission.Action.DELETE)
); 

Copy link

@orca-security-eu orca-security-eu bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca

@bevzzz bevzzz marked this pull request as ready for review October 3, 2025 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant